﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlosMods.User.DTOs;

public class NetResponse<T>
{
    public bool IsSuccess { get; set; }
    public string? Message { get; set; }
    public T? Data { get; set; }

    public static NetResponse<T> Ok(T data, string message = "Success")
    {
        return new () { IsSuccess = true, Message = message, Data = data };
    }

    public static NetResponse<T> Fail(string message)
    {
        return new () { IsSuccess = false, Message = message};
    }
}

